package org.jeecg.modules.controller.business;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.dto.other.*;
import org.jeecg.modules.service.OtherService;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;

/**
 * @author Administrator
 * @Description: 其他功能模块业务队列
 * @Date 2021/06/04
 * @Created by wk
 */
@Api(tags="其他功能模块业务队列")
@RestController
@RequestMapping("/business/other")
public class OtherController {

    @Resource
    private OtherService otherService;

    @ApiOperation(value = "网关程序更新-只传 stationCodes", notes = "网关程序更新-只传 stationCodes")
    @PostMapping(value = "/stationUp")
    public Result<?> stationUp(@RequestBody StationUpFtpReq stationUpFtpReq) {
        stationUpFtpReq.setType(0);
        return otherService.stationUp(stationUpFtpReq);
    }

    @ApiOperation(value = "车桩程序更新", notes = "车桩程序更新")
    @PostMapping(value = "/pileUp")
    public Result<?> pileUp(@RequestBody StationUpFtpReq stationUpFtpReq) {
        stationUpFtpReq.setType(1);
        return otherService.pileUp(stationUpFtpReq);
    }

}
